package com.gopay.common.cps.manager.gsrt.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.gopay.common.cps.dao.gsrt.GsrtAccountTransferDao;
import com.gopay.common.cps.manager.gsrt.GsrtAccountTransferQueryManager;
import com.gopay.common.domain.gsrt.GsrtAccountTransfer;

@Repository("gsrtAccountTransferQueryManager")
public class GsrtAccountTransferQueryManagerImpl implements GsrtAccountTransferQueryManager {
	
	@Resource(name = "gsrtAccountTransferDao")
	private GsrtAccountTransferDao gsrtAccountTransferDao;
	
	@Override
	public List<GsrtAccountTransfer> getByGopayId(String gopayOrderId) {
		String hql=" from GsrtAccountTransfer where gopayOrderId=:gopayOrderId ";
		Map<String, Object> param = new HashMap<String, Object>();
		param.put("gopayOrderId", gopayOrderId);
		List<GsrtAccountTransfer> list=gsrtAccountTransferDao.findByHql(hql, param);
		return list;
	}

	@Override
	public List<GsrtAccountTransfer> getByMerIdOrderId(String merId, String orderId) {
		// TODO Auto-generated method stub
		return gsrtAccountTransferDao.getByMerIdOrderId(merId, orderId);
	}

}
